package com.meituan.sdk.model.tuangouNg.smar.batchUpsertProductApplicableRules;

import com.meituan.sdk.annotations.ApiMeta;
import java.util.List;
import com.google.gson.reflect.TypeToken;
import java.lang.reflect.Type;
import com.meituan.sdk.internal.utils.JsonUtil;
import com.google.gson.annotations.SerializedName;
import javax.validation.constraints.NotNull;
import com.meituan.sdk.MeituanResponse;
import com.meituan.sdk.MeituanRequest;
import javax.validation.constraints.NotEmpty;

/**
* 批量上传/更新团购映射/代金券适用规则
* This file was automatically generated.
*/
@ApiMeta(
    path = "/tuangou/ng/smar/product/rule/upload",
    businessId = 1,
    apiVersion = "10002",
    apiName = "batch_upsert_product_applicable_rules",
    needAuth = true
)
public class BatchUpsertProductApplicableRulesRequest implements MeituanRequest<BatchUpsertProductApplicableRulesResponse> {
    /**
    * <p data-diff-id="ct-diff-id-6751902e-1b3e-4060-a009-e7068f4dfc88">维度，1-总部, 2-门店</p>
    */
    @NotNull(message = "scope不能为空")
    @SerializedName("scope")
    private Integer scope;
    /**
    * <p data-diff-id="ct-diff-id-2a6a2207-10a7-412f-b358-5985bba39994">总部code，当scope = 1时必填</p>
    */
    @SerializedName("vendorChainId")
    private String vendorChainId;
    /**
    * <p data-diff-id="ct-diff-id-0e2dfc1e-8d27-4126-875d-2d2dcf2a8cb7">门店code，当scope = 2时必填</p>
    */
    @SerializedName("vendorShopId")
    private String vendorShopId;
    /**
    * <p data-diff-id="ct-diff-id-a1efd6e4-090f-4573-bd1c-7cefb7788262">项目类型, 1-套餐,2-代金券</p>
    */
    @NotNull(message = "productType不能为空")
    @SerializedName("productType")
    private Integer productType;
    /**
    * <p data-diff-id="ct-diff-id-371b22dd-6dc8-4cbf-8fc5-7bad27c7fe4a">团购代金券配置列表</p>
    */
    @NotEmpty(message = "ruleList不能为空")
    @SerializedName("ruleList")
    private List<PDealCouponRule> ruleList;

    public Integer getScope() {
        return scope;
    }
    public void setScope(Integer scope) {
        this.scope = scope;
    }
    public String getVendorChainId() {
        return vendorChainId;
    }
    public void setVendorChainId(String vendorChainId) {
        this.vendorChainId = vendorChainId;
    }
    public String getVendorShopId() {
        return vendorShopId;
    }
    public void setVendorShopId(String vendorShopId) {
        this.vendorShopId = vendorShopId;
    }
    public Integer getProductType() {
        return productType;
    }
    public void setProductType(Integer productType) {
        this.productType = productType;
    }
    public List<PDealCouponRule> getRuleList() {
        return ruleList;
    }
    public void setRuleList(List<PDealCouponRule> ruleList) {
        this.ruleList = ruleList;
    }


    @Override
    public MeituanResponse<BatchUpsertProductApplicableRulesResponse> deserializeResponse(String response) {
        Type type = new TypeToken<MeituanResponse<BatchUpsertProductApplicableRulesResponse>>(){}.getType();
        return JsonUtil.fromJson(response, type);
    }
    @Override
    public String serializeToJson() {
        return JsonUtil.toJson(this);
    }


    @Override
    public String toString() {
        return "BatchUpsertProductApplicableRulesRequest{" + "scope=" + scope + "," + "vendorChainId=" + vendorChainId + "," + "vendorShopId=" + vendorShopId + "," + "productType=" + productType + "," + "ruleList=" + ruleList + "}";
    }
}
